<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>restclient-cpp: RestClient::Connection Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">restclient-cpp
   </div>
   <div id="projectbrief">C++ client for making HTTP/REST requests</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespace_rest_client.html">RestClient</a></li><li class="navelem"><a class="el" href="class_rest_client_1_1_connection.html">Connection</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="class_rest_client_1_1_connection-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">RestClient::Connection Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><a class="el" href="class_rest_client_1_1_connection.html" title="Connection object for advanced usage. ">Connection</a> object for advanced usage.  
 <a href="class_rest_client_1_1_connection.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="connection_8h_source.html">connection.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_rest_client_1_1_connection_1_1_info.html">Info</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">holds some diagnostics information about the connection object it came from  <a href="struct_rest_client_1_1_connection_1_1_info.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_rest_client_1_1_connection_1_1_request_info.html">RequestInfo</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">holds some diagnostics information about a request  <a href="struct_rest_client_1_1_connection_1_1_request_info.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a658af2c6d1300c8a02e7f6436b43b4c9"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_rest_client_1_1_connection.html#a658af2c6d1300c8a02e7f6436b43b4c9">Connection</a> (const std::string &amp;baseUrl)</td></tr>
<tr class="memdesc:a658af2c6d1300c8a02e7f6436b43b4c9"><td class="mdescLeft">&#160;</td><td class="mdescRight">constructor for the <a class="el" href="class_rest_client_1_1_connection.html" title="Connection object for advanced usage. ">Connection</a> object  <a href="#a658af2c6d1300c8a02e7f6436b43b4c9">More...</a><br /></td></tr>
<tr class="separator:a658af2c6d1300c8a02e7f6436b43b4c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9fdc2ee1b3b2cc2cca1f9fd29e6fd73f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_rest_client_1_1_connection.html#a9fdc2ee1b3b2cc2cca1f9fd29e6fd73f">SetBasicAuth</a> (const std::string &amp;username, const std::string &amp;password)</td></tr>
<tr class="memdesc:a9fdc2ee1b3b2cc2cca1f9fd29e6fd73f"><td class="mdescLeft">&#160;</td><td class="mdescRight">set username and password for basic auth  <a href="#a9fdc2ee1b3b2cc2cca1f9fd29e6fd73f">More...</a><br /></td></tr>
<tr class="separator:a9fdc2ee1b3b2cc2cca1f9fd29e6fd73f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad7b6f92f59861b4c8dc914d4d226d89d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_rest_client_1_1_connection.html#ad7b6f92f59861b4c8dc914d4d226d89d">SetTimeout</a> (int seconds)</td></tr>
<tr class="memdesc:ad7b6f92f59861b4c8dc914d4d226d89d"><td class="mdescLeft">&#160;</td><td class="mdescRight">set timeout for connection  <a href="#ad7b6f92f59861b4c8dc914d4d226d89d">More...</a><br /></td></tr>
<tr class="separator:ad7b6f92f59861b4c8dc914d4d226d89d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a77c9d405950492f9bcec21ce79edd2b3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_rest_client_1_1_connection.html#a77c9d405950492f9bcec21ce79edd2b3">FollowRedirects</a> (bool follow)</td></tr>
<tr class="memdesc:a77c9d405950492f9bcec21ce79edd2b3"><td class="mdescLeft">&#160;</td><td class="mdescRight">configure whether to follow redirects on this connection  <a href="#a77c9d405950492f9bcec21ce79edd2b3">More...</a><br /></td></tr>
<tr class="separator:a77c9d405950492f9bcec21ce79edd2b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3e510fdf8291e9e277df72b0fae0a111"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_rest_client_1_1_connection.html#a3e510fdf8291e9e277df72b0fae0a111">SetUserAgent</a> (const std::string &amp;userAgent)</td></tr>
<tr class="memdesc:a3e510fdf8291e9e277df72b0fae0a111"><td class="mdescLeft">&#160;</td><td class="mdescRight">set custom user agent for connection. This gets prepended to the default restclient-cpp/RESTCLIENT_VERSION string  <a href="#a3e510fdf8291e9e277df72b0fae0a111">More...</a><br /></td></tr>
<tr class="separator:a3e510fdf8291e9e277df72b0fae0a111"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afd74a344a00b58fc6997e34c37dde834"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_rest_client_1_1_connection.html#afd74a344a00b58fc6997e34c37dde834">SetCAInfoFilePath</a> (const std::string &amp;caInfoFilePath)</td></tr>
<tr class="memdesc:afd74a344a00b58fc6997e34c37dde834"><td class="mdescLeft">&#160;</td><td class="mdescRight">set custom Certificate Authority (CA) path  <a href="#afd74a344a00b58fc6997e34c37dde834">More...</a><br /></td></tr>
<tr class="separator:afd74a344a00b58fc6997e34c37dde834"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac6d5285360d1b8a1e314768f57835ef0"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac6d5285360d1b8a1e314768f57835ef0"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>SetCertPath</b> (const std::string &amp;cert)</td></tr>
<tr class="separator:ac6d5285360d1b8a1e314768f57835ef0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9d05b4a8537707eeddd552d8af0ddd9f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9d05b4a8537707eeddd552d8af0ddd9f"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>SetCertType</b> (const std::string &amp;type)</td></tr>
<tr class="separator:a9d05b4a8537707eeddd552d8af0ddd9f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a78b5512722642a0aaa1e3fecb5a3bd99"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a78b5512722642a0aaa1e3fecb5a3bd99"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>SetKeyPath</b> (const std::string &amp;keyPath)</td></tr>
<tr class="separator:a78b5512722642a0aaa1e3fecb5a3bd99"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa4353eb1df932b254aa02446f4ac3b32"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_rest_client_1_1_connection.html#aa4353eb1df932b254aa02446f4ac3b32">GetUserAgent</a> ()</td></tr>
<tr class="memdesc:aa4353eb1df932b254aa02446f4ac3b32"><td class="mdescLeft">&#160;</td><td class="mdescRight">get the user agent to add to the request  <a href="#aa4353eb1df932b254aa02446f4ac3b32">More...</a><br /></td></tr>
<tr class="separator:aa4353eb1df932b254aa02446f4ac3b32"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac489a801edc621a384cdfb29e7071231"><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_rest_client_1_1_connection_1_1_info.html">RestClient::Connection::Info</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_rest_client_1_1_connection.html#ac489a801edc621a384cdfb29e7071231">GetInfo</a> ()</td></tr>
<tr class="memdesc:ac489a801edc621a384cdfb29e7071231"><td class="mdescLeft">&#160;</td><td class="mdescRight">get diagnostic information about the connection object  <a href="#ac489a801edc621a384cdfb29e7071231">More...</a><br /></td></tr>
<tr class="separator:ac489a801edc621a384cdfb29e7071231"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6af41bf467a80deb83f20044f2c17344"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_rest_client_1_1_connection.html#a6af41bf467a80deb83f20044f2c17344">SetHeaders</a> (<a class="el" href="namespace_rest_client.html#ab2bbc7fd5ec10171e4e1fb2d7fc8e865">RestClient::HeaderFields</a> headers)</td></tr>
<tr class="memdesc:a6af41bf467a80deb83f20044f2c17344"><td class="mdescLeft">&#160;</td><td class="mdescRight">set the custom headers map. This will replace the currently configured headers with the provided ones. If you want to add additional headers, use <a class="el" href="class_rest_client_1_1_connection.html#a60fd7521bfb4f604e6c7cdd278f038b3" title="append a header to the internal map ">AppendHeader()</a>  <a href="#a6af41bf467a80deb83f20044f2c17344">More...</a><br /></td></tr>
<tr class="separator:a6af41bf467a80deb83f20044f2c17344"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afa869b17f4fb6387c057bfb9fcbd0bbf"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespace_rest_client.html#ab2bbc7fd5ec10171e4e1fb2d7fc8e865">RestClient::HeaderFields</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_rest_client_1_1_connection.html#afa869b17f4fb6387c057bfb9fcbd0bbf">GetHeaders</a> ()</td></tr>
<tr class="memdesc:afa869b17f4fb6387c057bfb9fcbd0bbf"><td class="mdescLeft">&#160;</td><td class="mdescRight">get all custom headers set on the connection  <a href="#afa869b17f4fb6387c057bfb9fcbd0bbf">More...</a><br /></td></tr>
<tr class="separator:afa869b17f4fb6387c057bfb9fcbd0bbf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a60fd7521bfb4f604e6c7cdd278f038b3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_rest_client_1_1_connection.html#a60fd7521bfb4f604e6c7cdd278f038b3">AppendHeader</a> (const std::string &amp;key, const std::string &amp;value)</td></tr>
<tr class="memdesc:a60fd7521bfb4f604e6c7cdd278f038b3"><td class="mdescLeft">&#160;</td><td class="mdescRight">append a header to the internal map  <a href="#a60fd7521bfb4f604e6c7cdd278f038b3">More...</a><br /></td></tr>
<tr class="separator:a60fd7521bfb4f604e6c7cdd278f038b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad52e3500f995cb681b5f3d7f83d36418"><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_rest_client_1_1_response.html">RestClient::Response</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_rest_client_1_1_connection.html#ad52e3500f995cb681b5f3d7f83d36418">get</a> (const std::string &amp;uri)</td></tr>
<tr class="memdesc:ad52e3500f995cb681b5f3d7f83d36418"><td class="mdescLeft">&#160;</td><td class="mdescRight">HTTP GET method.  <a href="#ad52e3500f995cb681b5f3d7f83d36418">More...</a><br /></td></tr>
<tr class="separator:ad52e3500f995cb681b5f3d7f83d36418"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a76b11e6e01fb84cafdacf99e49aae6a7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_rest_client_1_1_response.html">RestClient::Response</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_rest_client_1_1_connection.html#a76b11e6e01fb84cafdacf99e49aae6a7">post</a> (const std::string &amp;uri, const std::string &amp;data)</td></tr>
<tr class="memdesc:a76b11e6e01fb84cafdacf99e49aae6a7"><td class="mdescLeft">&#160;</td><td class="mdescRight">HTTP POST method.  <a href="#a76b11e6e01fb84cafdacf99e49aae6a7">More...</a><br /></td></tr>
<tr class="separator:a76b11e6e01fb84cafdacf99e49aae6a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af1a30c5aa6a646e6bad4caf2abb7084c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_rest_client_1_1_response.html">RestClient::Response</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_rest_client_1_1_connection.html#af1a30c5aa6a646e6bad4caf2abb7084c">put</a> (const std::string &amp;uri, const std::string &amp;data)</td></tr>
<tr class="memdesc:af1a30c5aa6a646e6bad4caf2abb7084c"><td class="mdescLeft">&#160;</td><td class="mdescRight">HTTP PUT method.  <a href="#af1a30c5aa6a646e6bad4caf2abb7084c">More...</a><br /></td></tr>
<tr class="separator:af1a30c5aa6a646e6bad4caf2abb7084c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4a14035f66375a7291f9d16d87db41f2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_rest_client_1_1_response.html">RestClient::Response</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_rest_client_1_1_connection.html#a4a14035f66375a7291f9d16d87db41f2">del</a> (const std::string &amp;uri)</td></tr>
<tr class="memdesc:a4a14035f66375a7291f9d16d87db41f2"><td class="mdescLeft">&#160;</td><td class="mdescRight">HTTP DELETE method.  <a href="#a4a14035f66375a7291f9d16d87db41f2">More...</a><br /></td></tr>
<tr class="separator:a4a14035f66375a7291f9d16d87db41f2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a64f085227c8c4d47dc6c84fea4f71398"><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_rest_client_1_1_response.html">RestClient::Response</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_rest_client_1_1_connection.html#a64f085227c8c4d47dc6c84fea4f71398">head</a> (const std::string &amp;uri)</td></tr>
<tr class="memdesc:a64f085227c8c4d47dc6c84fea4f71398"><td class="mdescLeft">&#160;</td><td class="mdescRight">HTTP HEAD method.  <a href="#a64f085227c8c4d47dc6c84fea4f71398">More...</a><br /></td></tr>
<tr class="separator:a64f085227c8c4d47dc6c84fea4f71398"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><a class="el" href="class_rest_client_1_1_connection.html" title="Connection object for advanced usage. ">Connection</a> object for advanced usage. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a658af2c6d1300c8a02e7f6436b43b4c9"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">RestClient::Connection::Connection </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>baseUrl</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>constructor for the <a class="el" href="class_rest_client_1_1_connection.html" title="Connection object for advanced usage. ">Connection</a> object </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">baseUrl</td><td>- base URL for the connection to use </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a60fd7521bfb4f604e6c7cdd278f038b3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void RestClient::Connection::AppendHeader </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>append a header to the internal map </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">key</td><td>for the header field </td></tr>
    <tr><td class="paramname">value</td><td>for the header field </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a4a14035f66375a7291f9d16d87db41f2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="struct_rest_client_1_1_response.html">RestClient::Response</a> RestClient::Connection::del </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>url</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>HTTP DELETE method. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">url</td><td>to query</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>response struct </dd></dl>
<p>we want HTTP DELETE</p>
<p>set HTTP DELETE METHOD </p>

</div>
</div>
<a class="anchor" id="a77c9d405950492f9bcec21ce79edd2b3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void RestClient::Connection::FollowRedirects </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>follow</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>configure whether to follow redirects on this connection </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">follow</td><td>- boolean whether to follow redirects </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ad52e3500f995cb681b5f3d7f83d36418"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="struct_rest_client_1_1_response.html">RestClient::Response</a> RestClient::Connection::get </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>url</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>HTTP GET method. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">url</td><td>to query</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>response struct </dd></dl>

</div>
</div>
<a class="anchor" id="afa869b17f4fb6387c057bfb9fcbd0bbf"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespace_rest_client.html#ab2bbc7fd5ec10171e4e1fb2d7fc8e865">RestClient::HeaderFields</a> RestClient::Connection::GetHeaders </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>get all custom headers set on the connection </p>
<dl class="section return"><dt>Returns</dt><dd>a <a class="el" href="namespace_rest_client.html#ab2bbc7fd5ec10171e4e1fb2d7fc8e865">RestClient::HeaderFields</a> map containing the custom headers </dd></dl>

</div>
</div>
<a class="anchor" id="ac489a801edc621a384cdfb29e7071231"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="struct_rest_client_1_1_connection_1_1_info.html">RestClient::Connection::Info</a> RestClient::Connection::GetInfo </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>get diagnostic information about the connection object </p>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="struct_rest_client_1_1_connection_1_1_info.html" title="holds some diagnostics information about the connection object it came from ">RestClient::Connection::Info</a> struct </dd></dl>

</div>
</div>
<a class="anchor" id="aa4353eb1df932b254aa02446f4ac3b32"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::string RestClient::Connection::GetUserAgent </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>get the user agent to add to the request </p>
<dl class="section return"><dt>Returns</dt><dd>user agent as std::string </dd></dl>

</div>
</div>
<a class="anchor" id="a64f085227c8c4d47dc6c84fea4f71398"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="struct_rest_client_1_1_response.html">RestClient::Response</a> RestClient::Connection::head </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>url</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>HTTP HEAD method. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">url</td><td>to query</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>response struct </dd></dl>
<p>we want HTTP HEAD</p>
<p>set HTTP HEAD METHOD </p>

</div>
</div>
<a class="anchor" id="a76b11e6e01fb84cafdacf99e49aae6a7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="struct_rest_client_1_1_response.html">RestClient::Response</a> RestClient::Connection::post </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>url</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>HTTP POST method. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">url</td><td>to query </td></tr>
    <tr><td class="paramname">data</td><td>HTTP POST body</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>response struct </dd></dl>
<p>Now specify we want to POST data</p>
<p>set post fields </p>

</div>
</div>
<a class="anchor" id="af1a30c5aa6a646e6bad4caf2abb7084c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="struct_rest_client_1_1_response.html">RestClient::Response</a> RestClient::Connection::put </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>url</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>HTTP PUT method. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">url</td><td>to query </td></tr>
    <tr><td class="paramname">data</td><td>HTTP PUT body</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>response struct </dd></dl>
<p>initialize upload object</p>
<p>Now specify we want to PUT data</p>
<p>set read callback function</p>
<p>set data object to pass to callback function</p>
<p>set data size </p>

</div>
</div>
<a class="anchor" id="a9fdc2ee1b3b2cc2cca1f9fd29e6fd73f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void RestClient::Connection::SetBasicAuth </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>username</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>password</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>set username and password for basic auth </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">username</td><td></td></tr>
    <tr><td class="paramname">password</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="afd74a344a00b58fc6997e34c37dde834"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void RestClient::Connection::SetCAInfoFilePath </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>caInfoFilePath</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>set custom Certificate Authority (CA) path </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">caInfoFilePath</td><td>- The path to a file holding the certificates used to verify the peer with. See CURLOPT_CAINFO </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a6af41bf467a80deb83f20044f2c17344"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void RestClient::Connection::SetHeaders </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespace_rest_client.html#ab2bbc7fd5ec10171e4e1fb2d7fc8e865">RestClient::HeaderFields</a>&#160;</td>
          <td class="paramname"><em>headers</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>set the custom headers map. This will replace the currently configured headers with the provided ones. If you want to add additional headers, use <a class="el" href="class_rest_client_1_1_connection.html#a60fd7521bfb4f604e6c7cdd278f038b3" title="append a header to the internal map ">AppendHeader()</a> </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">headers</td><td>to set </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ad7b6f92f59861b4c8dc914d4d226d89d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void RestClient::Connection::SetTimeout </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>seconds</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>set timeout for connection </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">seconds</td><td>- timeout in seconds </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a3e510fdf8291e9e277df72b0fae0a111"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void RestClient::Connection::SetUserAgent </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>userAgent</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>set custom user agent for connection. This gets prepended to the default restclient-cpp/RESTCLIENT_VERSION string </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">userAgent</td><td>- custom userAgent prefix </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>include/restclient-cpp/<a class="el" href="connection_8h_source.html">connection.h</a></li>
<li>source/connection.cc</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Dec 2 2016 10:53:09 for restclient-cpp by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
</body>
</html>
